home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Napigator Server List Parser
- ** $VER: MakeServerList.rexx 0.1 (12.9.2000)
- **
- ** By Roger Clark (kaedric@texas.net)
- ** September 12, 2000
- **
- */
-
- Options Results
-
- crnl = '0d0a'x
-
- If ShowList('H','TCP') Then Do
- If Open(Website,'TCP:www.napigator.com/80','W') Then Do
- Call WriteCh(Website,'GET /servers.php?version=108 HTTP/1.0')
- Call WriteCh(Website,'User-Agent: MakeServerList/0.1;'||crnl)
- Call WriteCh(Website,'Accept: *;q=1'||crnl)
- Call WriteCh(Website,'Host: www.napigator.com'||crnl)
- Call WriteCh(Website,crnl)
- Data = ReadLn(Website)
- If Subword(Data,2,1) ~= 200 Then Do
- Call WriteLn(Website,'Quit')
- Call Close(Website)
- Say 'Error encountered.'
- Exit
- End
- Call Open(Output,'Ram:Amster.servers','W')
- Do Until EOF(Website)
- Data = ReadLn(Website)
- If Pos('.',Word(Data,1)) > 0 Then Call WriteLn(Output,Word(Data,1)' 'Word(Data,2)' 0 COMMENT "'Word(Data,7)'"')
- End
- Call Close(Output)
- Call WriteLn(Website,'Quit')
- Call Close(Website)
- Say 'Ram:Amster.servers has been sucessfully created!'
- End
- Else Say 'Unable to connect to napigator.com'
- End
- Else Do
- Say 'Could not access the web. Is your TCP stack started?'
- End
- Exit
-